/**
 * 
 */
package com.example.downloadmanagerdemo.download;

/**
 * @author careyjwang
 * 
 */
public class DownloadInfo {
	private String downloadUrl;
	private String packageName;
	private String iconUrl;
	private String savePath;
	
	private int id;
	private int progress;

	private long size;
	private long downloadedSize = 0;
	private int downloadState = DownloadStatus.STATUS_INIT;

	/**
	 * @return the downloadUrl
	 */
	public String getDownloadUrl() {
		return downloadUrl;
	}

	/**
	 * @param downloadUrl
	 *            the downloadUrl to set
	 */
	public void setDownloadUrl(String downloadUrl) {
		this.downloadUrl = downloadUrl;
	}

	/**
	 * @return the packageName
	 */
	public String getPackageName() {
		return packageName;
	}

	/**
	 * @param packageName
	 *            the packageName to set
	 */
	public void setPackageName(String packageName) {
		this.packageName = packageName;
	}

	/**
	 * @return the iconUrl
	 */
	public String getIconUrl() {
		return iconUrl;
	}

	/**
	 * @param iconUrl
	 *            the iconUrl to set
	 */
	public void setIconUrl(String iconUrl) {
		this.iconUrl = iconUrl;
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the size
	 */
	public long getSize() {
		return size;
	}

	/**
	 * @param size
	 *            the size to set
	 */
	public void setSize(long size) {
		this.size = size;
	}

	/**
	 * @return the downloadedSize
	 */
	public long getDownloadedSize() {
		return downloadedSize;
	}

	/**
	 * @param downloadedSize
	 *            the downloadedSize to set
	 */
	public void setDownloadedSize(long downloadedSize) {
		this.downloadedSize = downloadedSize;
	}

	public void updateDownloadedSize(long added) {
		downloadedSize += added;
	}

	/**
	 * @return the progress
	 */
	public int getProgress() {
		return progress;
	}

	/**
	 * @param progress
	 *            the progress to set
	 */
	public void setProgress(int progress) {
		this.progress = progress;
	}

	/**
	 * @return the downloadState
	 */
	public int getDownloadState() {
		return downloadState;
	}

	/**
	 * @param downloadState the downloadState to set
	 */
	public void setDownloadState(int downloadState) {
		this.downloadState = downloadState;
	}

	/**
	 * @return the savePath
	 */
	public String getSavePath() {
		return savePath;
	}

	/**
	 * @param savePath the savePath to set
	 */
	public void setSavePath(String savePath) {
		this.savePath = savePath;
	}
}
